home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 3
/
Info_Mac_1994-01.iso
/
Graphics
/
Utility
/
GL Viewer 1.1.1
/
src ƒ
/
memoryio.h
< prev
next >
Wrap
Text File
|
1993-08-09
|
692b
|
29 lines
#ifndef H_memoryio
#define H_memoryio
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct
{
const char *filename;
char *buffer;
unsigned long bufLen;
unsigned long currPos;
} MemoryFile;
MemoryFile *mopen (const char *filename, const char *mode);
int mclose (MemoryFile *stream);
int mseek (MemoryFile *stream, long offset, int whence);
long mtell (MemoryFile *stream);
size_t mread (void *array, size_t size, size_t numitems, MemoryFile *stream);
size_t mwrite (const void *array, size_t size, size_t numitems, MemoryFile *stream);
int mgetc (MemoryFile *stream);
int mputc (char c, MemoryFile *stream);
#endif /* H_memoryio */